package com.seadragon.apps.fashion.service.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.seadragon.apps.fashion.model.Item;
import com.seadragon.apps.fashion.repository.ItemRepository;
import com.seadragon.apps.fashion.service.ItemService;

@Service
@Transactional
public class ItemServiceImpl implements ItemService {
	@Autowired
	private ItemRepository itemRepository;
	
	public Item save(Item item) {
		return itemRepository.save(item);
	}

	public void update(Item item) {
		itemRepository.saveAndFlush(item);
	}

}
